﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
                    xmlns:TouchControls="clr-namespace:TouchControls;assembly=TouchControls">
    <LinearGradientBrush x:Key="ButtonCustomBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#B2B2C8E0" Offset="0"/>
        <GradientStop Color="#B286A8CE" Offset="0.5"/>
        <GradientStop Color="#B2779FCC" Offset="0.5"/>
        <GradientStop Color="#B2517EB1" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#F3F3F3" Offset="0"/>
        <GradientStop Color="#EBEBEB" Offset="0.5"/>
        <GradientStop Color="#DDDDDD" Offset="0.5"/>
        <GradientStop Color="#CDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    <Style x:Key="BtnPath" TargetType="{x:Type ButtonBase}">
        <Setter Property="Margin" Value="0, 0, 3, 3" />
        <Setter Property="Padding" Value="6, 0, 0, 0" />
        <!--<Setter Property="Height" Value="32" />-->
        <Setter Property="MinWidth" Value="48" />
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Foreground" Value="White" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <!--<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderDefaulted="{TemplateBinding IsDefaulted}" SnapsToDevicePixels="true">-->
                    <Border x:Name="Chrome" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                        <ContentPresenter 
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            Margin="6, 0, 6, 0" 
                            RecognizesAccessKey="True" 
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                    <!--</Microsoft_Windows_Themes:ButtonChrome>-->
                    <ControlTemplate.Triggers>
                        <!--<Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked" Value="true">
                            <Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
                        </Trigger>-->
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TileButton" TargetType="{x:Type TouchControls:Tile}">
        <Setter Property="Background" Value="#EE9C4EB0"/> <!-- AA80EF -->
        <Setter Property="Width" Value="96" />
        <Setter Property="Height" Value="96" />
        <Setter Property="FontSize" Value="14" />
    </Style>
    <Style x:Key="TileWelcomeButton" TargetType="{x:Type TouchControls:Tile}">
        <Setter Property="Background" Value="#EE39B54A"/>
        <!-- AA80EF -->
        <Setter Property="Width" Value="86" />
        <Setter Property="Height" Value="86" />
        <Setter Property="FontSize" Value="14" />
    </Style>
    <Style x:Key="TileFavButton" TargetType="{x:Type TouchControls:Tile}">
        <Setter Property="Background" Value="#EEDE9317"/>
        <Setter Property="Width" Value="106" />
        <Setter Property="Height" Value="106" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="IconSize" Value="64" />
    </Style>
    <Style x:Key="VerySmallTileButton" TargetType="{x:Type TouchControls:Tile}">
        <Setter Property="Background" Value="Transparent"/>
        <!-- AA80EF -->
        <Setter Property="TextAlignment" Value="Center" />
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="40" />
        <Setter Property="FontSize" Value="9" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Margin" Value="0 4 12 4" />
        <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
    </Style>

    <Style x:Key="ImageButton" TargetType="{x:Type ButtonBase}">
        <Setter Property="Background" Value="#81007F"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <ContentControl>
                        <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </ContentControl>
                    <ControlTemplate.Triggers>
                        <!--<Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
                        </Trigger>-->
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Opacity" TargetName="Content" Value="0.5"/>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked" Value="true">
                            <Setter Property="Opacity" TargetName="Content" Value="0.8"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="BtnHome" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="Margin" Value="0, 5, 10, 5" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                	<Image Source="{StaticResource ImgHome}" Width="48" Height="48" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnUp" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
       	<Setter Property="Margin" Value="0, 5, 10, 5" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgFolderUp}" Width="48" Height="48" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnHome32" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="Margin" Value="0, 0, 10, 0" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgHome32}" Width="32" Height="32" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnUp32" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="Margin" Value="0, 0, 10, 0" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgFolderUp32}" Width="32" Height="32" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnDisplay" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgDisplay}" Width="48" Height="48" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnShutdown" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgShutdown}" Width="48" Height="48" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BtnWindows" BasedOn="{StaticResource ImageButton}" TargetType="{x:Type ButtonBase}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{StaticResource ImgWindows}" Width="48" Height="48" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>